import upload from '@/utils/upload'
import request from '@/utils/request'

// 用户头像上传
export function selectThailList() {
    return request({
        url: '/coupon/thali/list',
        method: 'get'
    })
}

export function getThailOne(ids) {
    return request({
        url: '/coupon/thali/info/'+ids,
        method: 'get'
    })
}

export function buyThailOne(id) {
    return request({
        url: '/coupon/thali/buy?id='+id,
        method: 'post',
        param: id
    })
}

export function selectCardPackageList(id) {
    return request({
        url: '/coupon/cardPackage/list',
        method: 'get'
    })
}

export function getMyCouponOne(id) {
    return request({
        url: '/coupon/coupon/info/'+id,
        method: 'get'
    })
}

export function getMyCouponStatus() {
    return request({
        url: '/coupon/list',
        method: 'get'
    })
}

export function getMyPayList() {
    return request({
        url: '/coupon/myPayList',
        method: 'get'
    })
}

export function getCouponExchange(code) {
    return request({
        url: '/person/exchange?code='+code,
        method: 'post',
        data: {
            code: code
        }
    })
}

